|
Menyplacering |
---|
Draft → Scale |
Arbetsbänkar |
Draft, Arch |
Standard genväg |
S C |
Introducerad i version |
- |
Se även |
Draft Clone |
Detta verktyg skalar valda objekt runt en baspunkt. Om inga objekt är markerade, så kommer du ombes att välja ett.
The command can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or BIM Workbench.
Scaling an object around a base point
See also: Draft Snap and Draft Constrain.
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts.
See also: Preferences Editor and Draft Preferences.
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To scale objects use the scale
method of the Draft module.
scaled_list = scale(objectslist, scale=Vector(1,1,1), center=Vector(0,0,0), copy=False)
objectslist
contains the objects to be scaled. It is either a single object or a list of objects.scale
is the vector that specifies by the X, Y and Z scale factors.center
is the center point of the scaling operation.copy
is True
copies are created instead of scaling the original objects.scaled_list
is returned with the original scaled objects, or with the new copies. It is either a single object or a list of objects, depending on objectslist
.Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
pts = [App.Vector(0, 0, 0), App.Vector(500, 500, 0), App.Vector(600, 0, 0)]
wire1 = Draft.make_wire(pts, closed=True)
doc.recompute()
scale1 = App.Vector(2.3, 0.75, 0)
wire2 = Draft.scale(wire1, scale1, copy=True)
doc.recompute()
scale2 = App.Vector(-2, -1.5, 0)
wires = Draft.scale([wire1, wire2], scale2, copy=True)
doc.recompute()